A hand-moved scanner is a device for transforming the word and picture images into digital signals by photoelectric transformation, and comprises a hand-moved scanning engine and an interface electrically connected to the CPU of a computer. The scanning modes of the scanning engine includes a transverse scanning and a longitudinal scanning. For a transverse scanning, a charge-coupled device (CCD) transforms an intensity of light into an analog voltage signal when it detects the light casted by the scanner and reflected from an image, and transmits the analog signal to the CPU of the computer through the interface. The signal is put into a display memory unit of the computer after it is processed by an application program stored in the computer, and thus the transverse scanning line is displayed on the monitor. For longitudinal scanning, the signal is obtained by making the scanner move longitudinally. By combining the transverse and the longitudinal scanning modes, a two-dimensional image is obtained. In other words, the work of a hand-moved scanner is done by photoelectric transformation in transverse scanning and scanner-movement in longitudinal scanning.
The major defect of the hand-moved scanner is the instability caused by hand operation. To overcome such shortcoming, a hand-moved scanner always includes therein a roller. When the scanner moves, the roller drives a speed-changing gear assembly which in turn drives a diaphragm wheel when it rolls. The diaphragm wheel is installed in a distance sensor and the spokes of the diaphragm wheel are usually designed to be evenly distributed thereon. The distance sensor outputs a high/low potential signal responsive to a particular shield/exposure position of the diaphragm wheel according to the roll of the diaphragm wheel. Whenever the potential is changed between high and low once, the change indicates that a new scanning line has been reached. It is to be noticed that every scanning line corresponds to a predetermined longitudinal shift of the scanner. The unstability caused by hand operation can be minimized according to this kind of design. In other words, even though the moving speed of the scanner is not uniform, the number of scanned transverse lines representable by the changing times of the output potential can be detected. The charge array converted from the light and stored in the CCD must be sent out in order so that there exists a minimum time for a transverse scanning detaining in the CCD. If the charge array is not completely sent out, the next scanning cycle will not be initiated. The duration that a charge array is completely sent out is called an "integrated time". When designing a hand-moved scanner, a designer uses the integrated time as a period for synchronizing the high/low potential signals detected by the distance sensor in order to avoid confusion of an image. However, if the period between two sequential high/low potential signals detected by the distance sensor is less than the integrated time, e.g. the scanner is moved too fast, one of the potential signals will be ignored and the line-drop situation will be caused. The output signal of a hand-moved scanning apparatus consists of a step trigger, a write gate and a video data pulses. Generally speaking, a line of video data responsive to a line movement is generated when a scanner is operated. Before the video data is generated, a sub-scanning synchronous pulse is generated first to represent the beginning of a line of video data. The generation of the write gate pulse accompanies that of the video data pulse and the generation of every write gate pulse accompanies that of n-bit video data. The greater n value is, the more data can be transmitted in a time interval. FIG. 1 shows an output signal generated when n value is 4. The time between two sub-scanning synchronous pulses is the integration time and also is the exposure time of the image sensor of the hand-moved scanner. If the scanner is moved so fast that the output voltage of the distance sensor is changed between high and low more than once in an exposure time, the scanning apparatus can only output a line of video data and will disregard the rest of the data and thus the line-drop situation is caused. FIG. 2 is a diagram showing the time sequence when there is a line-drop, wherein the pulse 21 is outputted by the distance sensor.
Prior art related to line-drop detection for an image scanned by hand-moved scanner as disclosed in ROC Patent Application No. 81107334 is briefly described below. The method for line-drop detection of the prior art includes obtaining a value by counting the times of high/low potential changes the distance sensor encounters, obtaining another value by counting the numbers of the sub-scanning synchronous pulses, and comparing these two values to determine there is a line-drop situation if these two values are not equal. The apparatus of the prior art is shown in FIG. 3, which comprises a distance sensor 30, a counter 31, a sub-scanning synchronous signal generator 32, another counter 33, a comparing unit 34, a multiplexer 35, a memory unit 36, a line-drop counter 37, a data flip-flop 38 and a break-processing unit 39.
The distance sensor 30 sends out a signal 301 responsive to a high/low potential change it encounters to the counter 31 which counts the times of high/low potential changes and outputs a value. The value corresponds to a longitudinally moved distance of the scanner. The counter 33 counts the numbers of the sub-scanning synchronous pulses 321 generated by sub-scanning synchronous signal generator 32 and outputs another value. A step trigger signal enables the comparing unit 34 to compare the two values. If the two values are not equal, it is found that there is a line-drop situation. A signal representing that there is a line-drop situation is outputted by the comparing unit 34 and transmitted to the break-processing unit 39 through the data flip-flop 38. The break-processing unit 39, if enabled, will cause the CPU 40 of a computer to process the line-drop situation directly. The CPU uses an application program to imitate the lost scanning lines automatically. If the break-processing unit 39 is not enabled, the signal representing there is a line-drop situation and outputted by the comparing unit 34 is transmitted to the multiplexer 35. The multiplexer 35 further transmits the signal to the memory unit 36 which stores the values counted by the counters 31 and 33 therein. The difference between the values counted by the counters 31 and 33 equals to the number of dropped lines. At the same time, the value stored in the line-drop counter 37 is accumulatedly carried. After the number of dropped lines is finished recording, the value counted by the counter 31 is stored in the counter 33 to replace the former value and the two values stored in the counters 31 and 33 are the same again. Thus the line-drop detection goes on.
When the scanning process is over, the CPU 40 will read the value counted by the line-drop counter 37, and judge the existence and the number of the dropped lines according to the value. Furthermore, the CPU 40 reads the related data from the memory unit 36 according to the value and judge the positions of the dropped lines. When the positions of the dropped lines are found, the CPU 40 will inform the user to scan again or automatically imitate the lost scanning lines according to the ability of the application program stored in the CPU 40.
The prior art mentioned above uses at least two counters and a comparing unit to detect whether there is a line-drop situation so that the hardware structure thereof is somewhat complicated.